# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Jens Adam (byte/jra) <j_adam@web.de>

pkgname=kwalletcli
pkgver=2.11
pkgrel=1
pkgdesc="Command-Line Interface for the KDE Wallet"
url="http://www.mirbsd.org/kwalletcli.htm"
license=('custom:MirOS' 'LGPL3')
arch=('i686' 'x86_64')
depends=('kdebase-runtime' 'mksh')
optdepends=('gnupg2' 'openssh' 'pinentry')
source=("http://www.mirbsd.org/MirOS/dist/hosted/${pkgname}/${pkgname}-${pkgver}.tar.gz")
md5sums=('bf5c0bc1608041dd637f0e8e5e4f8586')

build() {
  cd "${srcdir}"/${pkgname}
  KDE_VER=4 KDE_INCS="-I/usr/include/Qt -I/usr/include/QtCore" make -e
}

package() {
  cd "${srcdir}"/${pkgname}
  install -d "${pkgdir}"/usr/{bin,share/man/man1}
  for F in kwalletaskpass kwalletcli kwalletcli_getpin pinentry-kwallet; do
    install ${F} "${pkgdir}"/usr/bin/${F}
    install -m644 ${F}.1 "${pkgdir}"/usr/share/man/man1/${F}.1
  done
  install -Dm644 LICENCE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENCE
}
